<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body{
width:60px;font-size:12px;color:#666;
}
a{
color:#333;
line-height:20px;
}
a.new{
color:red;
}
</style>
</head>
<body>
<div id='m'>
<a href="http://weibo.com/" target="_blank">我的微博</a><br/>
<a href="http://weibo.com/messages" target="_blank">我的私信</a><br/>
<a href="http://weibo.com/atme" target="_blank">@提到我的</a><br/>
<a href="http://weibo.com/comments" target="_blank">我的评论</a><br/>
</div>
</body>
<script>
if(localStorage.islogin == 0){
	chrome.tabs.create({ 'url': 'http://www.weibo.com/' });
	window.close();
}else{
	var sa = document.getElementsByTagName('a');
	if(localStorage.dm > 0){
		sa[1].innerText = localStorage.dm+'条新私信';
		sa[1].className='new';
	}else{
		sa[1].innerText ='我的私信';
		sa[1].className='';
	}
	if(localStorage.mentions > 0){
		sa[2].innerText = localStorage.mentions+'条@提到我';
		sa[2].className='new';
	}else{
		sa[2].innerText ='@提到我的';
		sa[2].className='';
	}
	if(localStorage.comments > 0){
		sa[3].innerText = localStorage.comments+'条新评论';
		sa[3].className='new';
	}else{
		sa[3].innerText ='我的评论';
		sa[3].className='';
	}
}
</script>
</html>